package com.black.platform.dictionary.service.handler;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.black.common.vo.DictionaryTreeVo;
import com.black.common.web.PageQuery;
import com.black.platform.dictionary.po.Dictionary;

import java.util.List;

public interface DictionaryHandlerService {

    IPage<DictionaryTreeVo> search(PageQuery<Dictionary> searchVo);

    Dictionary getById(Long id);

    /**
     * 通过类型代码获取字典集
     * @param codeType 类型代码
     * @param isIncludeInvalid 是否包含无效数据
     * @return 字典集
     */
    List<Dictionary> getByCodeType(String codeType, boolean isIncludeInvalid);

    boolean deleteByIds(List<Long> ids);

    List<DictionaryTreeVo> getDictionaryTreeVo();

    boolean save(Dictionary dictionary);

    boolean update(Dictionary dictionary);

    List<DictionaryTreeVo> getAllCodeTypeTreeVo();

}
